﻿using System;


namespace advadev.CanOpen
{

    /// <summary>
    /// Must be implemented from each can open object dictionary container
    /// </summary>
    public interface ICanOpenObjectDictionaryContainer
    {

        /// <summary>
        /// When implemented, gets the node id of the can open object dictionary
        /// container
        /// </summary>
        byte NodeId
        {
            get;
        }

        /// <summary>
        /// When implemented, gets the can open object with the given index as
        /// can open data field object
        /// </summary>
        /// <param name="index">
        /// Index of the can open object to get
        /// </param>
        /// <returns>
        /// The can open object with the given index as data field object or
        /// null
        /// </returns>
        ICanOpenDataFieldObject GetCanOpenObject(UInt16 index);

        /// <summary>
        /// When implemented, gets the can open object with the given index and
        /// sub index as can open value object
        /// </summary>
        /// <param name="index">
        /// Index of the can open object to get
        /// </param>
        /// <param name="subIndex">
        /// Sub index of the can open object to get
        /// </param>
        /// <returns>
        /// The can open object with the given index and sub index as value
        /// object or null
        /// </returns>
        ICanOpenValueObject GetCanOpenObject(UInt16 index, byte subIndex);

    }

}
